function Inint_AJAX() 
{
	try 
	{ 
		return new ActiveXObject("Msxml2.XMLHTTP");  
	} 
	catch(e) 
	{} //IE
	try 
	{ 
		return new ActiveXObject("Microsoft.XMLHTTP"); 
	} 
	catch(e) {} //IE
	try 
	{ 
		return new XMLHttpRequest(); 
	} catch(e) {} //Native Javascript
	alert("XMLHttpRequest not supported");
	return null;
};
		
function changeDistrict(district,val) 
{
	var req = Inint_AJAX();
	req.onreadystatechange = function () 
	{ 
		//document.getElementById('formLoader').innerHTML="<img src='images/ajax-loader.gif' />";
		if (req.readyState==4)
		{
			if (req.status==200) 
			{
				//document.getElementById('formLoader').innerHTML=" ";
				document.getElementById(district).innerHTML=req.responseText; 
							//alert(req.responseText);
			} 
		}
	};
	req.open("post", "Bactformdrop.php?data="+district+"&val="+val); 
	req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=tis-620"); // set Header
	req.send(null); 
}
window.onLoad=changeDistrict('district',-1);   


function changeForm(form_id,val) 
{
	var req = Inint_AJAX();
	req.onreadystatechange = function () 
	{ 
		document.getElementById('formLoader').innerHTML="<img src='images/ajax-loader.gif' />";
		if (req.readyState==4)
		{
			if (req.status==200) 
			{
				document.getElementById('formLoader').innerHTML=" ";
				document.getElementById(form_id).innerHTML=req.responseText; 
							//alert(req.responseText);
			} 
		}
	};
	req.open("post", "Bactformdrop.php?data="+form_id+"&val="+val); 
	req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=tis-620"); // set Header
	req.send(null); 
}

